import { UserConfig } from "vite";
import checker from "vite-plugin-checker";
import { viteMockServe } from "vite-plugin-mock";


const config: UserConfig = {
  server: {
    proxy: {
      "/api": {
        target: "http://127.0.0.1:8090/",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ""),
      },
    },
  },
  plugins: [
    checker({ typescript: true }),
    viteMockServe(),
  ],
};

export default config;
